<template>
		<view class="good_list_item" @click="gotoDetail(goods)">
		
		 	<view class="good_list_item_left">
		 		<image :src=" goods.goods_small_logo||defaultPic"  ></image>
				
		 	</view>
			<view class="good_list_item_right">
				<view class="good_list_item_right_top">
					{{goods.goods_name}}
				</view>
				<view class="good_list_item_right_bootom">
					{{goods.goods_price|price}}
				</view>
			</view>
		</view>
		
		 
</template>

<script>
	export default {	
		name:'myGoods',
		props:{
			goods:{
				type:Object,
				default:{}
			}
		},
		data() {
			return {
				
				defaultPic:"https://img3.doubanio.com/f/movie/8dd0c794499fe925ae2ae89ee30cd225750457b4/pics/movie/celebrity-default-medium.png"
					
				
			};
		},
	
		methods:{
			gotoDetail(goods){
					uni.navigateTo({
						url:"/subpkg/goods_detail/goods_detail?goods_id="+goods.goods_id
					})
			}
		
			
		},
		filters:{
			price(pri){
				var pris = pri.toFixed(2)
				return '￥'+pris;
			}
		}
	}
</script>

<style lang="scss" >
	.good_list_item{
		width: 100%;
		display:flex;
		justify-content:space-between;
		align-items: center;
		height: 130rpx;
		margin: 10px 0px;
		
	}
	.good_list_item_right{
		flex-direction: column;
		display: flex;
		justify-content: space-between;
		align-items: flex-start;
		margin-left: 16rpx;
	}
	.good_list_item_left {
		width: 20%;
	height: 100%;
		
	}
	.good_list_item_left image{
		width: 100% ;
		height: 100% ;
	}
	.good_list_item_right_bootom {
		color:#ab3761;
	}
	.good_list_item_right_top{
		color:#070707;
	}
	.good_list_item_right{
		height: 100%;
		width: 80%;
		font-size: 14px;
		color: #333;
		border-bottom:1px solid #f5f5f5 ;
	}
</style>
